package lab02.test37;

public class UnderGraduate extends Student {

    public UnderGraduate(String name, int Chinese, int English, int math) {
        super(name, Chinese, English, math);
    }

    public double averageGrade(int Chinese, int English, int math) {
        double average;
        average = (Chinese + English + math) / 3;
        return average;
    }

    public void underGraduate(double average) {
        if (average > 60) {
            System.out.println("超过规定分数：" + (average - 60) + "分！");
            System.out.println("3门课程的平均分数超过60分,通过!");
        } else {
            System.out.println("离规定分数还差：" + (60 - average) + "分！");
            System.out.println("3门课程的平均分数未超过60分，未通过！");
        }
    }


}
